<!DOCTYPE html>
<!--
This is a starter template page. Use this page to start your new project from
scratch. This page gets rid of all links and provides the needed markup only.
-->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head th:replace="top::html" />
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>AdminLTE 2 | Starter</title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">

<body class="fixed hold-transition skin-blue">
    <div class="wrapper">

        <!-- Main Header -->
        <div th:replace="tophtml::html"></div>
        <!-- Left side column. contains the logo and sidebar -->
        <div th:replace="left::html"></div>

        <!-- Content Wrapper. Contains page content -->
        <div class="content-wrapper">
            <!-- Content Header (Page header) -->
            <section class="content-header">
                <h1>
                   <span>修改会议</span> 
                 <small>(<span style="color: red">*</span> 为必填项目)</small>
                </h1>
                <ol class="breadcrumb">
                  <li><a href="/index"><i class="fa fa-dashboard"></i>用户中心</a></li>
					<li><a href="/conference/conferenceList">会议管理</a></li>
					<li><a href="#">修改会议</a></li>
                </ol>
            </section>

            <!-- Main content -->
            <section class="content container-fluid">
                <form th:action="@{/conference/saveUpdateConference}" method="post"
			enctype="multipart/form-data" th:object="${conference}" id="form1">
                    <input type="hidden" th:value="${pid}" class="form-control"
						name="pid" /> <input type="hidden"
						th:value="${conference.conferenceNumber}" class="form-control"
						name="conferenceNumber" />

					<div class="form-group">
						<label for="conferenceName">活动名称</label> <span style="color: red">*</span> <input
							type="text" th:value="${conference.conferenceName}"
							class="form-control required" name="conferenceName"
							placeholder="Enter ...">
						<p style="color: red;"
							th:if="${#fields.hasErrors('conferenceName')}"
							th:errors="*{conferenceName}">Error</p>
					</div>

					<div class="form-group">
						<label for="conferenceWebSite">会议主页</label> <input
							th:value="${conference.conferenceWebSite}"
							class="form-control url" name="conferenceWebSite"
							placeholder="http://">
					</div>


					<div class="form-group">
						<label>活动总结</label>
						<textarea class="form-control" name="conferenceSummary"
							th:utext="${conference.conferenceSummary}" rows="3"
							placeholder="Enter ..."></textarea>
					</div>

					<div class="form-group">
						<p style="color: red;"
							th:if="${#fields.hasErrors('researchField')}"
							th:errors="*{researchField}">Error</p>
						<label for="researchField">所属领域</label> <span style="color: red">*</span>
						<div class="checkbox"
							th:each="rfd : ${researchFieldDictiontryList}">
							<label> <input type="checkbox" name="researchField"
								th:value="${rfd.names}" th:text="${rfd.worth}"
								th:checked="${#arrays.contains(researchFieldArr, rfd.names)}" required>
							</label>
						</div>
					</div>

					<div class="form-group">
						<label for="conferenceDateTime">会议开始时间:</label> <span style="color: red">*</span>
						<div class="input-group date">
							<div class="input-group-addon">
								<i class="fa fa-calendar"></i>
							</div>
							<input type="text" class="form-control pull-right required"
								th:value="${conference.conferenceDateTime}" id="datepicker"
								name="conferenceDateTime">
							<p style="color: red;"
								th:if="${#fields.hasErrors('conferenceDateTime')}"
								th:errors="*{conferenceDateTime}">Error</p>
						</div>
					</div>


					<div class="form-group">
						<label for="conferenceBeginTime">会议结束时间:</label> <span style="color: red">*</span>
						<div class="input-group date">
							<div class="input-group-addon">
								<i class="fa fa-calendar"></i>
							</div>
							<input type="text" class="form-control pull-right required"
								th:value="${conference.conferenceBeginTime}" id="datepicker2"
								name="conferenceBeginTime">
							<p style="color: red;"
								th:if="${#fields.hasErrors('conferenceBeginTime')}"
								th:errors="*{conferenceBeginTime}">Error</p>
						</div>
					</div>

					 <div class="form-group">
					 <p style="color: red;"
							th:if="${#fields.hasErrors('area')}"
							th:errors="*{area}">Error</p>
                        <label>国内国外</label>
                        <span style="color: red">*</span>
                        <p style="color: red;" th:text="${domesticOrForeign}"></p>
                        <div class="radio">
                            <label>
                                <input type="radio" name="domesticOrForeign" id="optionsRadios1" value="0" th:checked="${conference.domesticOrForeign == 0}"> 国内
                            </label>
                        </div>
                        <div class="radio">
                            <label>
                                <input type="radio" name="domesticOrForeign" id="optionsRadios2" value="1" th:checked="${conference.domesticOrForeign == 1}"> 国外
                            </label>
                        </div>
                    </div>
                    <!-- 选择国内必须选地区 -->
                    <div class="form-group form-area">
                        <label>省</label>
                        <span style="color: red">*</span>
                        <p style="color: red;" th:text="${area}"></p>
                        <select class="form-control form-area" id="provinceId">
                            <option value="-1">--选择省--</option>
                            <option th:each="list:${provinceDictiontryList}" th:value="${list.names}" th:text="${list.worth}" th:selected="${list.names eq province}"></option>
                        </select>
                    </div>
                    <div class="form-group form-area">
                        <label>市</label>
                        <select class="form-control form-area" id="cityId">
                            <option value="-1">--选择市--</option>
                            <option th:each="list:${cityDictiontryList}" th:value="${list.names}" th:text="${list.worth}" th:selected="${list.names eq cityId}"></option>
                        </select>
                    </div>
                    <div class="form-group form-area">
                        <label>区</label>
                        <select class="form-control form-area" id="areaId">
                            <option value="-1">--选择区--</option>
                            <option th:each="list:${areaDictiontryList}" th:value="${list.names}" th:text="${list.worth}" th:selected="${list.names eq areaId}"></option>
                        </select>
                    </div>
                    
					
					<div class="form-group form-country">
                        <label>国家</label>
                        <span style="color: red">*</span>
                        <p style="color: red;" th:text="${area}"></p>
                        <select class="form-control form-area">
                            <option value="-1">--选择国家--</option>
                            <option th:each="list:${countryDictiontryList}" th:value="${list.pid}" th:text="${list.worth}" th:selected="${list.pid eq countryId}"></option>
                        </select>
                    </div>

					<div class="form-group">
						<label for="exampleInputFile">活动总结附件</label> <input type="file"
							name="conferenceFiles" id="conferenceFile">

						<p class="help-block">Example block-level help text here.</p>
					</div>


					<div class="form-group">
						<label>会议执行团队</label> <input type="text" class="form-control"
							th:value="${conference.tearm}" name="tearm" placeholder="用逗号隔开">
					</div>
					
					<div class="form-group">
						<label>备注1</label> <input type="text" class="form-control"
							th:value="${conference.remark1}" name="remark1">
					</div>
					
					<div class="form-group">
						<label>备注2</label> <input type="text" class="form-control"
							th:value="${conference.remark2}" name="remark2" >
					</div>

					<div style="width:240px; height: 30px; position:fixed;left:770px;bottom:10px;">
						<button type="submit" class="btn btn-primary">提交</button>
						<button type="button" class="btn btn-primary" onclick="window.history.go(-1)" style="margin-left: 30px;">返回</button>
					</div>

                </form>
            </section>
            <!-- /.content -->
        </div>
        <!-- /.content-wrapper -->

        <!-- Main Footer -->
        <div th:replace="footer::html"></div>
        <div class="control-sidebar-bg"></div>
    </div>
    <div th:replace="bottom::html" ></div>
</body>

</html>